package preprocessor.absorption;

import option.InitParam;

/**
 * For every absorption that implements this interface, it should follow the
 * guidelines: 1. input: a single axiom 2. output: boolean val. true if fully
 * absorbed, false otherwise. 3. a single axiom may be fully absorbed, leaving
 * no GCIs. Otherwise, the remaining part will be GCIs, sending back to the
 * Tbox. 4. Pipeline the absorptions? tbd.
 * 
 * @author j55wu
 * 
 */
public interface Absorption {

	// this refers to standard unary absorption
	public final static boolean CA = InitParam
			.getBooleanProperty("absorption.unary");

	// this refers to negated unary absorption
	public final static boolean NCA = InitParam
			.getBooleanProperty("absorption.unary.neg");

	// this refers to binary absorption
	public final static boolean BA = InitParam
			.getBooleanProperty("absorption.binary");

	// Only allow guards in BA, not general primitive concepts in BA
	public final static boolean BA_Limited = BA
			&& InitParam.getBooleanProperty("absorption.binary.restricted");

	// this refers to domain/range or inverse-role-based absorption
	// EX R.A => B is the same as A => ALL R-.B
	// for future extension only, since no inverse role supported yet.
	public final static boolean IRA = InitParam
			.getBooleanProperty("absorption.inverse");

	/**
	 * When <b>IRA</b> is used, Role Absorption is turned off, otherwise on.<br>
	 * 1. EX R.A => B is absorbed as the domain of R: B or (ALL R.~A)<br>
	 * 2. B => ALL R.A is absorbed as the domain of R: ~B or (ALL R.A)
	 */
	public final static boolean RA = InitParam
			.getBooleanProperty("absorption.role");

	// this refers to the enhanced unary absorption: A=>B, ~A=>C, then add a gci
	// T => B or C
	public final static boolean ECA = InitParam
			.getBooleanProperty("absorption.unary.enhanced");

	// if true, A=C becomes A => C and not A => not C. This requires NCA true.
	public final static boolean EQA = NCA
			&& InitParam.getBooleanProperty("absorption.equiv.split");

	// an absorption returns true iff the given axiom is absorbed and no new gci
	// generated.
	// boolean absorb();
}
